#ifndef LOGICINTERFACE_H
#define LOGICINTERFACE_H

#include <stdint.h>


class LogicInterface
{

  public:

	virtual void Open() {};
	virtual void Close() {};

	virtual ~LogicInterface() { Close(); };

	void ListDevices();
	char * DeviceName(uint8_t device);
	void GetFirmwareVersion(uint8_t &major, uint8_t &minor);
	uint16_t GetConfiguration();

	virtual void Reset() = 0;
	virtual uint32_t GetID() = 0;
	virtual void SetAddress(uint8_t type, uint8_t number, uint8_t addr) = 0;
//	virtual void SetAddress(uint32_t addr) = 0;
	virtual void SetShortAddress(uint8_t number, uint8_t addr) = 0;
//	virtual void SetShortAddress(uint16_t addr) = 0;
//	virtual void SetLongAddress(uint8_t haddr, uint8_t type, uint8_t number, uint8_t addr) = 0;
//	virtual void SetLongAddress(uint32_t addr) = 0;
//	virtual void IncrementAddress() = 0;
//	virtual void DecrementAddress() = 0;

	virtual uint8_t ReadByte() = 0;
//	virtual void ReadByteFIFO(uint8_t * data, uint16_t n) = 0;
//	virtual void ReadByteBlock(uint8_t * data, uint16_t n) = 0;
	virtual void WriteByte(uint8_t data) = 0;

	bool ReadBool();
	void WriteBool(bool data);
    
	virtual uint16_t ReadWord() = 0;
	virtual void ReadWordFIFO(uint16_t * data, uint16_t n) = 0;
//	virtual void ReadWordBlock(uint16_t * data, uint16_t n) = 0;
	virtual void WriteWord(uint16_t data) = 0;

//	virtual uint32_t ReadTriple() = 0;
//	virtual void ReadTripleFIFO(uint16_t * data, uint16_t n) = 0;
//	virtual void ReadTripleBlock(uint16_t * data, uint16_t n) = 0;
//	virtual void WriteTriple(uint16_t data) = 0;

	virtual uint32_t ReadLong() = 0;
//	virtual void ReadLongFIFO(uint32_t * data, uint16_t n) = 0;
//	virtual void ReadLongBlock(uint32_t * data, uint16_t n) = 0;
	virtual void WriteLong(uint32_t data) = 0;
	
};


#endif
